﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Decoration.Models.Models
{
    public class ProjectInfo
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [ForeignKey(nameof(OrderId))]
        public int OrderId { get; set; }

        /// <summary>
        /// 业务类型
        /// </summary>
        public int BusinessType { get; set; }

        /// <summary>
        /// 项目周期
        /// </summary>
        [MaxLength(50)]
        public string? Period { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        [MaxLength(50)]
        public string ProjectName { get; set; } = null!;

        /// <summary>
        /// 负责人
        /// </summary>
        public int Leader { get; set; }

        [MaxLength(50)]
        public string LeaderName { get; set; } = null!;

        /// <summary>
        /// 所属客户
        /// </summary>
        public int Customer { get; set; }

        [MaxLength(50)]
        public string CustomerName { get; set; } = null!;



        /// <summary>
        /// 完成状态 0 - 筹备中 1 - 进行中 2 - 已完成
        /// </summary>
        public int CompletedStatus { get; set; } = 0;

        public DateTime CreateTime { get; set; } = DateTime.Now;

        public int Status { get; set; } = 1;

        public virtual ICollection<UserProcedure> UserProcedures { get; set; } = new List<UserProcedure>();

        public virtual OrderInfo? Order { get; set; } = null;

    }
}
